<template>
  <div class="app">
    <router-view></router-view>
  </div>
</template>

<script setup>
import {onMounted} from "vue";
import {useUserStore} from "@/store/user";

const userStore = useUserStore();

// 在应用挂载时初始化用户状态
onMounted(() => {
  userStore.initUserState();
});
</script>

<style lang="less">
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
  Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #f5f5f5;
}

.app {
  width: 100%;
  min-height: 100vh;
}
</style>
